package com.hixtrip.sample.client.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class R<T> {
    private String msg;
    private Integer code;
    private T data;

    public static <T>R<T> success(){
        return new R<>("success", 200, null);
    }
    public static <T>R<T> error(){
        return new R<>("error", 500, null);
    }
    public static <T>R<T> error(String msg){
        return new R<>(msg, 500, null);
    }
}
